home *** CD-ROM | disk | FTP | other *** search
- # Source Generated with Decompyle++
- # File: in.pyc (Python 2.6)
-
- __author__ = 'j.s@google.com (Jeff Scudder)'
- import atom.client as atom
- import urllib
- import urlparse
- import gdata.auth as gdata
- import gdata.service as gdata
- import atom.service as atom
-
- class GDClient(atom.client.AtomPubClient):
- pass
-
- SCOPE_URL_PARAM_NAME = gdata.service.SCOPE_URL_PARAM_NAME
- CLIENT_LOGIN_SCOPES = gdata.service.CLIENT_LOGIN_SCOPES
-
- class AuthorizationRequired(gdata.service.Error):
- pass
-
-
- class GDataClient(gdata.service.GDataService):
- '''This class is deprecated.
-
- All functionality has been migrated to gdata.service.GDataService.
- '''
-
- def __init__(self, application_name = None, tokens = None):
- gdata.service.GDataService.__init__(self, source = application_name, tokens = tokens)
-
-
- def ClientLogin(self, username, password, service_name, source = None, account_type = None, auth_url = None, login_token = None, login_captcha = None):
- gdata.service.GDataService.ClientLogin(self, username = username, password = password, account_type = account_type, service = service_name, auth_service_url = auth_url, source = source, captcha_token = login_token, captcha_response = login_captcha)
-
-
- def Get(self, url, parser):
- """Simplified interface for Get.
-
- Requires a parser function which takes the server response's body as
- the only argument.
-
- Args:
- url: A string or something that can be converted to a string using str.
- The URL of the requested resource.
- parser: A function which takes the HTTP body from the server as it's
- only result. Common values would include str,
- gdata.GDataEntryFromString, and gdata.GDataFeedFromString.
-
- Returns: The result of calling parser(http_response_body).
- """
- return gdata.service.GDataService.Get(self, uri = url, converter = parser)
-
-
- def Post(self, data, url, parser, media_source = None):
- """Streamlined version of Post.
-
- Requires a parser function which takes the server response's body as
- the only argument.
- """
- return gdata.service.GDataService.Post(self, data = data, uri = url, media_source = media_source, converter = parser)
-
-
- def Put(self, data, url, parser, media_source = None):
- """Streamlined version of Put.
-
- Requires a parser function which takes the server response's body as
- the only argument.
- """
- return gdata.service.GDataService.Put(self, data = data, uri = url, media_source = media_source, converter = parser)
-
-
- def Delete(self, url):
- return gdata.service.GDataService.Delete(self, uri = url)
-
-
- ExtractToken = gdata.service.ExtractToken
- GenerateAuthSubRequestUrl = gdata.service.GenerateAuthSubRequestUrl
-